﻿<presentation:UserControlView x:Class="Chronos.Client.Win.Views.Options.View"
                              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                              xmlns:presentation="clr-namespace:Rhiannon.Windows.Presentation;assembly=Rhiannon.Windows"
                              x:Uid="Profiler_OptionsView">
	<presentation:UserControlView.Resources>
        <Style x:Key="MenuToggleButtonStyle" TargetType="{x:Type ToggleButton}">
            <Setter Property="Cursor" Value="Hand" />
            <Setter Property="Height" Value="40" />
            <Setter Property="Foreground" Value="#000000" />
            <Setter Property="Margin" Value="0" />
            <Setter Property="Padding" Value="10" />

            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                        <Border Name="Border">
                            <Grid>
                                <ContentPresenter Name="ContentPresenter" TextBlock.FontSize="19" TextBlock.Foreground="{TemplateBinding Foreground}" 
												  TextBlock.FontWeight="Thin" Margin="{TemplateBinding Padding}" VerticalAlignment="Center" HorizontalAlignment="Center" />
                                <Border Name="Underline" Background="#31B6FD" Height="2" Visibility="Hidden" VerticalAlignment="Bottom" />
                            </Grid>
                        </Border>

                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="ContentPresenter" Property="TextBlock.Foreground" Value="#2a9cd9" />
                            </Trigger>
                            <Trigger Property="IsChecked" Value="True">
                                <Setter TargetName="ContentPresenter" Property="TextBlock.Foreground" Value="#2a9cd9" />
                                <Setter TargetName="Underline" Property="Visibility" Value="Visible" />
                                <!--<Setter TargetName="Border" Property="Background" Value="#ffffff" />-->
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </presentation:UserControlView.Resources>
	<Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
		</Grid.RowDefinitions>
		<Grid Grid.Row="1" Margin="10">
			<ContentControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding Documents.ActiveDocument.View}" />
		</Grid>
        <Grid Grid.Row="0">
            <Border Background="#EEEEEE" BorderBrush="#DDDDDD" BorderThickness="0,1,0,0">
                <ItemsControl ItemsSource="{Binding Documents}">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <ToggleButton Style="{StaticResource MenuToggleButtonStyle}" Content="{Binding Title}"
                                          IsChecked="{Binding IsActive}" />
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                    <ItemsControl.ItemsPanel>
                        <ItemsPanelTemplate>
                            <StackPanel Orientation="Horizontal" IsItemsHost="True" />
                        </ItemsPanelTemplate>
                    </ItemsControl.ItemsPanel>
                </ItemsControl>
            </Border>
        </Grid>
    </Grid>
</presentation:UserControlView>
